#!/usr/local/bin/python
# -*- coding: utf-8 -*-

import datetime
from flask import Flask, url_for, request, session, render_template, redirect
from json import dumps

from bompy import app
from utils import q, table, login_required, get2parameters, formtable, textinput, unitoptions, designoptions, typeoptions
from model import Design, BOM






@app.route('/alternatives')
@login_required
@get2parameters
def alternatives(IDP=None, IDC=None):
    d=Design.getCurrent(IDC).Description_Std
    t=table(["Parent ID","Description","Type","Child ID","Description","Type","Quantity","Unit","Created","By user","Updated","By user"])
    return render_template("alternatives.html",t=t,d=d)

  
